@import '_variables';

.home {
  padding: var(--navbar-height) 2rem 0;
  max-width: var(--homepage-width);
  margin: 0px auto;
  display: block;

  .hero {
    text-align: center;

    img {
      max-width: 100%;
      max-height: 280px;
      display: block;
      margin: 3rem auto 1.5rem;
    }

    h1 {
      font-size: 3rem;
    }

    h1,
    .description,
    .actions {
      margin: 1.8rem auto;
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: center;
    }

    .description {
      max-width: 35rem;
      font-size: 1.6rem;
      line-height: 1.3;
      color: var(--c-text-lightest);
    }

    .action-button {
      display: inline-block;
      font-size: 1.2rem;
      padding: 0.8rem 1.6rem;
      border-width: 2px;
      border-style: solid;
      border-radius: 4px;
      transition: background-color var(--t-color);
      box-sizing: border-box;

      &.primary {
        color: var(--c-bg);
        background-color: var(--c-brand);
        border-color: var(--c-brand);
        &:hover {
          background-color: var(--c-brand-light);
        }
      }

      &.secondary {
        color: var(--c-brand);
        background-color: var(--c-bg);
        border-color: var(--c-brand);
        &:hover {
          color: var(--c-bg);
          background-color: var(--c-brand-light);
        }
      }
    }
  }

  .features {
    border-top: 1px solid var(--c-border);
    transition: border-color var(--t-color);
    padding: 1.2rem 0;
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: stretch;
    justify-content: space-between;
  }

  .feature {
    flex-grow: 1;
    flex-basis: 30%;
    max-width: 30%;

    h2 {
      font-size: 1.4rem;
      font-weight: 500;
      border-bottom: none;
      padding-bottom: 0;
      color: var(--c-text-light);
    }

    p {
      color: var(--c-text-lighter);
    }
  }

  .theme-default-content {
    padding: 0;
    margin: 0;
  }

  .footer {
    padding: 2.5rem;
    border-top: 1px solid var(--c-border);
    text-align: center;
    color: var(--c-text-lighter);
    transition: border-color var(--t-color);
  }
}

@media (max-width: $MQMobile) {
  .home {
    .features {
      flex-direction: column;
    }

    .feature {
      max-width: 100%;
      padding: 0 2.5rem;
    }
  }
}

@media (max-width: $MQMobileNarrow) {
  .home {
    padding-left: 1.5rem;
    padding-right: 1.5rem;

    .hero {
      img {
        max-height: 210px;
        margin: 2rem auto 1.2rem;
      }

      h1 {
        font-size: 2rem;
      }

      h1,
      .description,
      .actions {
        margin: 1.2rem auto;
      }

      .description {
        font-size: 1.2rem;
      }

      .action-button {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
      }
    }

    .feature {
      h2 {
        font-size: 1.25rem;
      }
    }
  }
}
